package com.xianbeiying.app.ckgl.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.xianbeiying.app.ckgl.R;
import com.xianbeiying.app.ckgl.bean.NoticesBean;
import com.xianbeiying.app.ckgl.http.HttpCallBackUtil;
import com.xianbeiying.app.ckgl.model.GetModel;
import com.xianbeiying.app.ckgl.util.DataUtil;
/***
 * 公告详情
 * */
public class NoticeDetailActivity extends BaseActivity  implements HttpCallBackUtil{
     private GetModel getModel;
    private TextView tv_notice_title,tv_notice_content,tv_notice_date;
    private ImageView iv_title_left;
    private TextView tv_title;
    private NoticesBean.NOTICEBean noticesBean;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_notice_detail);
        initView();
    }

    private void initView() {
//        getModel=new GetModel(this);
//        getModel.addResponseListener(this);
        tv_title=(TextView) findViewById(R.id.tv_title);
        iv_title_left=(ImageView) findViewById(R.id.iv_title_left);
        tv_notice_title=(TextView) findViewById(R.id.tv_notice_title);
        tv_notice_content=(TextView) findViewById(R.id.tv_notice_content);
        tv_notice_date=(TextView) findViewById(R.id.tv_notice_date);
        tv_title.setText("公告详情");
        MainActivity.fragmentid=2;
        iv_title_left.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        initData();
    }
    private void initData() {
        noticesBean=(NoticesBean.NOTICEBean)getIntent().getSerializableExtra("noticesBean");
        tv_notice_title.setText(noticesBean.getTitle());
        tv_notice_content.setText(noticesBean.getContent());
        tv_notice_date.setText(DataUtil.paserTime(noticesBean.getNoticeTime()+"","yyyy-MM-dd"));
    }
    @Override
    public void onCallBackData(String url,Object content) {
    }
}
